<template>
  <div>
    <button @click="mag = !mag">qiehuan</button>
    <div class="box" v-if="mag">box1</div>
    <div class="box" v-show="mag">box2</div>
  </div>
</template>

<script>
export default {
  components: {},
  props: {},
  data() {
    return {
      mag: false,
    };
  },
  computed: {},
  watch: {},
  created() {},
  methods: {},
};
</script>

<style scoped>
.box {
  width: 100px;
  height: 100px;
  background-color: aquamarine;
  margin-bottom: 20px;
}
</style>
